<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <title>广告联调平台</title>
    <meta name="renderer" content="webkit">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <link href="layui/css/layui.css" rel="stylesheet">
</head>
<body>
<div class="layui-layout layui-layout-admin">
    <div class="layui-header">
        <div class="layui-logo layui-hide-xs layui-bg-black">广告联调平台</div>
        <!-- 头部区域（可配合layui 已有的水平导航） -->
        <ul class="layui-nav layui-layout-right">
            <li class="layui-nav-item layui-hide layui-show-sm-inline-block">
                <a>
                    <img src="img/yonghu.png" class="layui-nav-img">
                    <span id="uName"></span>
                </a>
                <dl class="layui-nav-child">
                    <dd><a lay-on="confirm">退出登录</a></dd>
                </dl>
            </li>
        </ul>
    </div>
    <div class="layui-side layui-bg-black">
        <div class="layui-side-scroll">
            <!-- 左侧导航区域（可配合layui已有的垂直导航） -->
            <ul class="layui-nav layui-nav-tree" lay-filter="test">
                <li class="layui-nav-item layui-nav-itemed"><a href="admin.html">首页</a></li>
                <li class="layui-nav-item">
                    <a class="" href="javascript:;">oppo</a>
                    <dl class="layui-nav-child">
                        <dd><a href="oppo/oppoIndex.html">数据汇总</a></dd>
                        <dd><a href="admin.html">数据明细</a></dd>
                        <dd><a href="admin.html">链接管理</a></dd>
                        <dd><a href="oppo/create.html">链接创建</a></dd>
                    </dl>
                </li>
                <li class="layui-nav-item">
                    <a class="" href="javascript:;">优酷</a>
                    <dl class="layui-nav-child">
                        <dd><a href="youku/selecteff.html">有效触点监测地址</a></dd>
                        <dd><a href="youku/effpoint.html">有效触点链接</a></dd>
                        <dd><a href="youku/selectadinfo.html">联调触点列表</a></dd>  
                        <dd><a href="youku/xianyuinfo.html">闲鱼触点列表</a></dd>  
                    </dl>
                </li>
                <li class="layui-nav-item">
                    <a class="" href="javascript:;">淘宝</a>
                    <dl class="layui-nav-child">
                        <dd><a href="taobao/deeplinkTb.html">deeplink转换工具</a></dd>
                    </dl>
                </li>
                <li class="layui-nav-item"><a href="admin.html">完善信息</a></li>
            </ul>
        </div>
    </div>
    <div class="layui-body">
        <!-- 内容主体区域 -->
        <div style="padding: 15px;">
            <blockquote class="layui-elem-quote layui-text">
                首页
            </blockquote>
            <div class="layui-row layui-col-space15">
                <div class="layui-col-md5">
                    <div class="grid-demo grid-demo-bg1">
                        <div class="layui-card layui-panel" style="background-color: #DCE2F1;">
                            <div class="layui-card-header">
                                简介
                            </div>
                            <div class="layui-card-body">
                                联调联调联调联调联调联调<br>
                                联调联调联调联调联调联调<br>
                                联调联调联调联调联调联调<br>
                                联调联调联调联调联调联调<br>
                                联调联调联调联调联调联调<br>
                                联调联调联调联调联调联调<br>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
            <br><br>
        </div>
    </div>
    <div class="layui-footer" style="text-align: center;">
        <!-- 底部固定区域 -->
        冀ICP备2025105329号
    </div>
</div>

<script src="layui/layui.js"></script>
<script src="layui/echarts.min.js"></script>
<script>
    //JS
    layui.use(['element', 'layer', 'util'], function(){
        var layer = layui.layer;
        var util = layui.util;
        var $ = layui.$;
        var query = layui.jquery;
        var userInfo = {};

        window.onload = function() {
            query.ajax({
                type:"POST",
                url:"/user/queryUser",
                success:function(result){
                    if (result.success === true) {
                        userInfo = result.user;
                        $('#uName').text(userInfo.mobileNo);
                    } else {
                        layer.alert('获取用户信息失败，请重新登录！', {
                            title: '发生错误'
                        });
                        setTimeout(function(){
                            window.location.href = "/";
                        }, 1500)
                    }
                },
                error:function(){
                    layer.alert('访问链接不存在！', {
                        title: '发生错误'
                    });
                }
            });

        };


        util.on('lay-on',{
            confirm: function() {
                layer.confirm('是否退出登录？', {
                    btn: ['确定']
                }, function(){
                    query.ajax({
                        type:"GET",
                        url:"/user/logout",
                        success:function(result){
                            if (result.success === true) {
                                layer.msg(result.msg, { icon:1 });
                                setTimeout(function(){
                                    window.location.href = "/";
                                }, 1500)
                            } else {
                                layer.msg(result.msg, { icon:2 });
                            }
                        },
                        error:function(){
                            layer.alert('访问链接不存在！', {
                                title: '发生错误'
                            });
                        }
                    })
                })
            }
        })

    });
</script>

</body>
</html>